let state;
state=localStorage.getItem('state');

$(document).ready(function(){
	console.log("state"+state);
	if(state==0) {
		var guide = $.guide({
			actions: [
				{
					element: $('#course-manage'),
					content: '<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true" data-autohide="false" style="background-color:rgb(255,255,255)">\n' +
						'\t\t  <div class="toast-header">\n' +
						'\t\t    <strong class="mr-auto">课程管理</strong>\n' +
						'\t\t  </div>\n' +
						'\t\t  <div class="toast-body text-dark">\n' +
						'\t\t    用户在该模块可以管理课程、课程目标和毕业要求指标点。\n' +
						'\t\t  </div>\n' +
						'\t\t</div>',
					offsetX: 0,
					offsetY: 300
				},
				{
					element: $('#teaching-content'),
					content: '<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true" data-autohide="false" style="background-color:rgb(255,255,255)">\n' +
						'\t\t  <div class="toast-header">\n' +
						'\t\t    <strong class="mr-auto">教学内容</strong>\n' +
						'\t\t  </div>\n' +
						'\t\t  <div class="toast-body text-dark">\n' +
						'\t\t    用户可以通过此功能修改并生成课程内容相关的文档。\n' +
						'\t\t  </div>\n' +
						'\t\t</div>',
					offsetX: 0,
					offsetY: 200,
				},
				{
					element: $('#teaching-procedure'),
					content:'<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true" data-autohide="false" style="background-color:rgb(255,255,255)">\n' +
						'\t\t  <div class="toast-header">\n' +
						'\t\t    <strong class="mr-auto">教学环节和评价方式</strong>\n' +
						'\t\t  </div>\n' +
						'\t\t  <div class="toast-body text-dark">\n' +
						'\t\t    为本课程规定的教学目标设置教学环节<br>各环节配备对应的评价方式<br>针对各课程目标设计考题的出题要点建议\n' +
						'\t\t  </div>\n' +
						'\t\t</div>',
					offsetX: 0,
					offsetY: -150,
				},
				{
					element: $('#study-evaluation'),
					content: '<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true" data-autohide="false" style="background-color:rgb(255,255,255)">\n' +
						'\t\t  <div class="toast-header">\n' +
						'\t\t    <strong class="mr-auto">学习评价</strong>\n' +
						'\t\t  </div>\n' +
						'\t\t  <div class="toast-body text-dark">\n' +
						'\t\t    \n' +
						'\t\t  </div>\n' +
						'\t\t</div>',
					offsetX: 0,
					offsetY: -50,
				}

			]
		});
		localStorage.setItem('state', '1');
		state = localStorage.getItem("state");
		console.log("state"+state);
	}
})
